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 / I need help with my code-glue object to limb problem

Author
Message
gamehazer
5
Years of Service
User Offline
Joined: 2nd May 2018
Location:
Posted: 7th May 2018 16:48
So I am gluing my plane object to a staff so the staff has some cool effects at the top of it.

After I glue the plane to the staff I can not rotate the plane to face the camera, even if I use the glue object 1,2,0,2. Adding the 2 at the end I still can not rotate the object plane to the camera so the effects show.

Is there a way to control the rotation of a plane after gluing it? I even rotate it before gluing it and still nothing. The effect shows half way and looks stupid.

Here is my glue code.

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 9th May 2018 05:34
When you glue object "A" to object "B" object "A" becomes a limb. You need to use the rotate limb command to rotate it during the game loop. Use "fix object pivot" before you glue if you want it to glue a specific way.
Alternatives are rotating the parent object since the limb will share its rotation and position, the "2" flag you are using is for positioning it "before" gluing I believe
A child's dream never dies.





gamehazer
5
Years of Service
User Offline
Joined: 2nd May 2018
Location:
Posted: 9th May 2018 05:46
Thank you, I will try the limb rotate command

But can you make the limb point to the camera?
gamehazer
5
Years of Service
User Offline
Joined: 2nd May 2018
Location:
Posted: 9th May 2018 19:31
Ok, solved, Thanks for your help

I went here https://forum.thegamecreators.com/thread/143263

And he has a function that points limbs and it worked, and looks so good in game.

Login to post a reply

Server time is: 2024-04-25 07:58:21
Your offset time is: 2024-04-25 07:58:21