Jump to content
johnnyboy

[SOLVED] point one object at another (bis_fnc_VectorDirAndUpRelative))

Recommended Posts

I searched for a while for this, and came up empty...

 

I want to be able to point an object at another object in 3d space.  So I need to calculate the values to use for setVectorDirAndUp.  I know how to get the vector to the target (heading):

_heading = [getPosASL _arrow, getPosASL _targetObj] call BIS_fnc_vectorFromXToY; 

And I know how to setvelocity using that heading, so the object moves toward the target.  But how do I get the values for setVectorDirAndUp so the object is pointing at the target?

 

I'll never understand vectors...they drive me crazy.

Share this post


Link to post
Share on other sites

On a sidenote:

Just because you think an object is facing forward doesn't mean it's actually facing forward.

Forward direction is being defined at model level, take a camping chair for example:

9sRSuUv.jpg

 

You'd think it's facing the same direction as the player,

but it actually is facing the other way, the chairs "forward" is facing towards me in this picture.
 

vectorDir player: [0.0240843,0.99971,0]
vectorDir chair: [0.196999,-0.98017,-0.021405]

Now go tell one arma inhabitant to put some chairs around a table, facing the table.

Hopefully he will explode his quad on the next fence.

I don't want to know for how many objects this actually applies, has got to be a running gag at this time, next to the lovely boundingBoxReal...

 

Cheers

  • Like 3
  • Haha 1

Share this post


Link to post
Share on other sites
6 hours ago, Grumpy Old Man said:

Now go tell one arma inhabitant to put some chairs around a table, facing the table.

Hopefully he will explode his quad on the next fence.

I don't want to know for how many objects this actually applies, has got to be a running gag at this time, next to the lovely boundingBoxReal...

Grumpy actually being grumpy...I like it!   Thanks, I knew about the chairs...pretty lame.

Share this post


Link to post
Share on other sites

It seems that a lot of wall/fence objects are long axis forward (90 degrees from where you might expect), which really confused the heck out of me for a minute. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×