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.

AppGameKit Studio Chat / Rotation Vector - Hinge Joints on Angles

Author
Message
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 1st May 2021 01:33
I think I figured out the connection between the angle of the object you are spinning on the hinge, and the rotation vector you need to set when making the hinge. I was following this thread: https://forum.thegamecreators.com/thread/221240 and was just playing around with a calculator to come up with this, it seems to work fine for a "hanging" type hinge (ie haven't tried doors on weird angles.) May be a useful starting point for anyone out there trying to have things spin on anything other than right angles, in the code below you can set the angle on line 33 to test out.



Attachments

Login to view attachments
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 2nd May 2021 13:27
Heres an example video showing hinges joints on angles, has led to a decent set of roller creator tools I now have for my factory-type game.

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 2nd May 2021 15:11
This is satisfying to watch

Nice work on the physics!


PSY LABS Games
Coders don't die, they just gosub without return
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd May 2021 21:50
Excellent work. Looks great
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th May 2021 15:24
great stuff very clever

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Paxi
3
Years of Service
User Offline
Joined: 18th Sep 2020
Location:
Posted: 21st May 2021 23:09
Very cool!

Login to post a reply

Server time is: 2024-04-26 02:30:50
Your offset time is: 2024-04-26 02:30:50