Jump to content
Barba-negra

attach to without affecting the rotation of the object

Recommended Posts

good night guys, greetings to all, I'm here to ask for help if they can help me, I'm trying to place an object with attachto but once I do this it makes a turn to another direction, and tried several ways and even The problem persists, this is what I have tried:

 

private _dir = (vectorDir _source vectorDiff vectorDir _target);

private _up = (vectorUp _source vectorDiff vectorUp _target);

 

_source attachTo [_target];

_source setVectorDirAndUp [_dir, _up];

 

but even if the object rotates, will it be possible to achieve this?

Share this post


Link to post
Share on other sites

To attach the object you can use this:

 

What_will_be_attached attachTo [Where_it_will_be_attached, [0, 0, 0] ]; 

 

and then to rotate it you can use:

 

What_has_been_attached setDir 90;

90 is how many degrees the object will be rotated. If the above fail then there are other ways which are more complicating.

  • Like 1

Share this post


Link to post
Share on other sites

I understand partner, if I was looking for a way to do it without having to rotate it again, , what happens is that in that way that you pose the object will focus on the base object and go to its position, my idea is that from the place where the tied object remains without moving when using the attachto, and with the command that I apply is done, but unfortunately it is turned to another direction, anyway thanks bro

  • Like 1

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

×