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.

Newcomers AppGameKit Corner / Fixed joints seem loose, why?

Author
Message
OriginalKronos
6
Years of Service
User Offline
Joined: 10th Nov 2017
Location:
Posted: 6th Jan 2019 18:31 Edited at: 5th Feb 2019 20:42
I am attaching dynamic cubes to a dynamic box with fixed joints but when I push the box the cubes seem to drag behind the box. I want them to be "fixed" to the box and stay in exactly the same position relative to the box at all times. They need to be dynamic bodies as I will eventually want to be able to apply forces to them.
Am I doing something wrong here?

See example below. Use arrow keys to move the box.

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 3rd Feb 2019 23:06
once you have set an object as a physics dynamic object
you can no longer position it and I believe its to late then to fix an object to it or visa versa
I would try and do the fixing of objects before you set them as physics objects. If for some
reason you have to change its position later you would have to delete3dpysicsobject(objtID)
reposition then recreate as a physics object

I hope that helps

another thing if you want to move the fixed object independantly i find it easiest to unfix the
object then fix the object back again

btw the code was hard to read without it being in comment blocks. The button at the top
where it says code click that once before your code and then again at the end of your code
will place your code in comment blocks and make it much easier to follow. It also has a copy
button then so people can copy and paste your code in their program

Goodluck with your software, Programming is fun
fubar

Login to post a reply

Server time is: 2024-04-23 08:59:35
Your offset time is: 2024-04-23 08:59:35