object movement
Moderator: Moderators
object movement
is it possble to have an object orbit a pathnode?
and how to make moving brush interact with water ?
and how to make moving brush interact with water ?
orbit
If your object has an origin that is offset, you can make it rotate around that point.
A brush, or script_object, can not interact with water, but you can make it move as if it is.
A brush, or script_object, can not interact with water, but you can make it move as if it is.
script_object
A "brush" is part of worldspawn. To make it move you have to turn it into an entity -- like a script_object. Just as you do with doors, you can add an origin textured brush to your script_object. The center of the origin brush will be the pivot point.
There are "wake" entities you can add.
There are "wake" entities you can add.
I have a dozen large asteroids that rotate and move around in orbit. I was trying to use followpath but learned that only works for models. they spin and move about to different script origins but its all a little messy and unnatural.
Orbit would be good - im looking into your suggestions - im used to serverside scripting everything and don't fully grasp the entity/brush/script origin binding stuff in radient. I suppose ill be able to bind spawns to a moving brush(or script_object) also when i figure it out.
Hard to find simple examples - I look at Skylimit to learn alot. but it's very complicated and alot of info to dig through.

In another I have a couple shark fins that swim about in the distance but they look funny without a wake. looking for that wake entity thing.
How to bind things to script_object ? In the little script box in entity panel? or on map script?
Thanks
Orbit would be good - im looking into your suggestions - im used to serverside scripting everything and don't fully grasp the entity/brush/script origin binding stuff in radient. I suppose ill be able to bind spawns to a moving brush(or script_object) also when i figure it out.
Hard to find simple examples - I look at Skylimit to learn alot. but it's very complicated and alot of info to dig through.

In another I have a couple shark fins that swim about in the distance but they look funny without a wake. looking for that wake entity thing.
How to bind things to script_object ? In the little script box in entity panel? or on map script?
Thanks
Followpath does work for script_objects . For your map though I would bind the objects to a script_origin and rotate it and also rotate the objects as well . If you don't use an origin brush as part of the object then it's middle will be the pivot point . If you don't want the object all rotateing the exact same way then use script to change the angles of the objects first then rotate them just use different angles and rotate them slowly so it looks more natural .
That is just an example you will have to try different values for best results . Both the script orign and the objects have to be rotated .$myobject bind $myscript_origin
$myobject angles ( 20 0 20 ) // what ever do a test
$myobject rotatey 2 // degrees per second try different values
$myscript_origin rotatey 4 // degrees per second
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Lol.
Maybe I'm weird, but I wouldn't use a script_origin and bind the meteors to them, but rather handle the movement manually.
Call as
where local.angular_velocity is a vector of the delta angles (increase) you want per second. 
Code: Select all
rotate_around_point local.point local.avel:
local.radius = vector_length (local.point - self.origin)
// we need a script_origin to get the angle
local.calcent = spawn script_origin origin local.point
local.angle = angles_pointat local.calcent local.calcent self
local.calcent delete
local.ftime = 1.0 / float(getcvar(sv_fps)) // server frame time
self time local.ftime
while (self) {
local.dest = local.point + angles_toforward(local.angle) * local.radius
self moveto local.dest
self move
local.angle += local.avel * local.ftime
waitframe
}
endCode: Select all
$object thread rotate_around_point local.point_coordinates local.angular_velocity



