Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Move Limb / Set Limb Position (Time for a silly question)

Author
Message
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Mar 2014 08:40 Edited at: 8th Mar 2014 09:19
In a world without EzRotate, mathematical savy or any sense whatsoever; how would you position a limb at a location in real world coordinates, regardless of its parent objects angle? I am not yet concerned about the limb's parent limb or the scale of its parent or the objects scale. I will also go on to create a move limb function using the same rules; apply parent object angle to movement.

I have no clue whatsover about these types of things; here is my current Matrix1 concept which probably will not work. I cannot perform any testing of it at present.

No doubt you are aware that Offset Limb calls will not apply real world coordinates; that is it will apply local ones.

This is for the most part a direct copy from the engine; it is not the most important function in the world, so do not kill too much of your time; I am just looking for inspiration.



Le Verdier
14
Years of Service
User Offline
Joined: 10th Jan 2012
Location: In the mosh-pit
Posted: 8th Mar 2014 12:04 Edited at: 8th Mar 2014 12:12
Get the Inverse Tranform matrix of the object
Transform the global coords with it
This give the local coords of this point !

Problem is "Get the Tranform matrix of the object"
you can't do that whitout a plugin
SET MATRIX4 TO OBJECT Matrix4Result, ObjectId in m1U
Or Madbit's Extended Rotation..

Or reconstruct the matrix with pos scale and rot, but it is heavy
and wasteful. I prefer plugins..

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Mar 2014 09:36
Thanks for your advice Le Verdier, since I do use Matrix1 I will try your method out. I will also try out Madbits plugin.

Login to post a reply

Server time is: 2026-07-07 03:02:45
Your offset time is: 2026-07-07 03:02:45