Re: linking presets [message #486056 is a reply to message #486054] |
Thu, 13 February 2014 13:58 |
Stallion
Messages: 222 Registered: April 2006
Karma:
|
Recruit |
|
|
Neijwiert wrote on Thu, 13 February 2014 15:53 | You mean like relative cordinates? You need to store the relative cordinates somewhere like: ChildObjPosition - ParentObjPosition and ChildObjRotation - ParentObjRotation. The child needs to be positioned when the parent is rotated with 0 degrees. Then whenever you move around/rotate the parent you need to recalculate the child position(s). The algorithms for this can be found on the internet.
Does not need to be related to c++, these problems occur at multiple places.
EDIT: with parent 0 rotation i mean like the default rotation of the thing...
EDIT #2: You can get the full translations of objects with Get_Transform, this returns a Matrix3D object which contains position and rotation. And you can apply that with Set_Transform
|
I thought it might end up that I need to do a custom script for it, so I'm installing the 2012 vs express, but I'm still very new to it, so is it possible for someone to give me an example script to start with?
edit: also, how would you do something like add a bandana or back packd to a soldier? (knowing this should give me an idea of my options)
Level edit is my play ground
[Updated on: Thu, 13 February 2014 14:01] Report message to a moderator
|
|
|