Page 1 of 1

Problem rotating $bind clip

Posted: Wed May 04, 2005 7:46 pm
by Kalti
Ehrm guys... I could use some help here....

The boatmodel on the sandhill in the image below (center right; behind the crates) doesn't have a collision map. It's a script model (targetname=beachedboat) and I'm trying to bind a wood clip shape to it which I made into a script_object (targetname=beachedboat_clip).

Image

Now, the boat model is set under some wacky angles because of the sandhill and the clip shape doesn't 'snap' to the exact location and orientation of the model...

I tried using an added origin brush to both elements but with no result at all.

Perhaps anyone of you with some insight on this ?

Posted: Wed May 04, 2005 9:30 pm
by lizardkid
Well if it's beached does it ever move? if it doesnt just forget bindings and build brushes around it.

clip

Posted: Thu May 05, 2005 6:43 am
by tltrude
Hmmm, Can't you just add the clip brushes to the script_object boat?

Anyway, you will have to use something like "vector_toangles" before you move and bind the clip boat. Bind, does not "snap" one object to another object's location. It just ties them together, so when you move one the other moves the same direction. "Glue" will make their origins snap together, but again, the angles will have to be pre set.

Posted: Thu May 05, 2005 12:11 pm
by Rookie One.pl
Glue glues the origin and angles as well.

Posted: Sat May 07, 2005 6:18 pm
by Kalti
Okay then, thanks sofar guys...

I'm willing to try my hands on the glue 'command'

The rowboat model itself:

Code: Select all

angle 45
angles 148 45 0
classname script_model
model static/bobson_boat/bobson_boat_blue.tik
origin 1033.19 -2428.88 239.92
spawnflags 3
targetname beachedboat
testanim idle
Anyways, if I'm understanding it all correctly... I need to create a new script_model of the boat; add an origin brush to the entity and then set it's angle(s)

Put in the clip shape as a script_object with an added origin brush at the same orientation like the origin of the boat; give it a unique targetname.

save the map & compile it.

Then do the actual gluing in the script. Anybody willing to provide me with an example script glue line ?

Posted: Sat May 07, 2005 7:32 pm
by Rookie One.pl
Does the boat ever move? Or is it just a decoration?

Posted: Sat May 07, 2005 9:26 pm
by wacko
Why not put a map file of ur boat where ur tik file is? This way the clip brushes would be rotated together with ur boat model:
Place ur model in an empty map so it's arrow's tail is as close to the origin (0/0/0) as possible. Build all the clip brushes needed around ur boat, delete the model and save the map with the same name as ur tik file and in the same folder. Just like for example the model of models/furniture/simplechair

Posted: Sat May 07, 2005 10:49 pm
by Rookie One.pl
Only if it is a static decoration. Otherwise you'd need to, depending on the entity class, glue script_objects to it or set the boat's collisionent to them.

Posted: Sat May 07, 2005 11:23 pm
by tltrude
$beachedboat_clip glue $beachedboat

Why does it need to be a script_model? If you would just tell us what you are trying to do, we wouldn't have to guess so much.

$beachedboat solid

Models and objects, already have origins. They are in the center of the bounding box. If you add an origin brush, you offset the origin to the center of that brush.

Posted: Sun May 08, 2005 1:47 am
by Kalti
Sorry guys... I'm confusing the purpose of this beached boat with the scripted movements of the boats in the water (those are script_models)

This boat is beached and so, no need to script them... which would imply I can just add it as a static model... It is however, a port from Spearhead to AA rowboat model, and to me it looks like the boat doesn't react properly to rotations and/or angle(s) input...

I'll try the map thing (thanks tltrude) although I think I tried it before with no result... again, something about this model port is just not right :(

Sorry about all this but I'm just trying to solve a problem I come across here.