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 Classic Chat / 3D Object rotation driving me nuts!

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Oct 2017 05:54
Couple of questions;

1. If i use SetObjectRotation() then RotateObjectLocal[X/Y/Z]() do not work
2. If i use RotateObjectLocalY() and then RotateObjectZ() i expect it to act like the wheel of a car and rotate around the axle but it tumbles end on end

Am i doing something wrong or are they the expected results?
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 30th Oct 2017 11:30
don't really use 3D myself but perhaps try FixObjectPivot in between the local and the global rotations.
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Oct 2017 11:57
if it is for a racing game i would split into damper axis and wheel.
so the wheel can turn relative around x and the damper is absolute the steering y axis.
the car drive local z axis forward.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.9.3) Radeon R7 265 : Mac mini OS High Sierra (10.13)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Oct 2017 20:55
It isn't related to physics. I am just trying to rotate the wheel around the y axis and then around the z axis (locally)
@smallg : The pivot is already in the center of the wheel
@markus: Are you suggesting i have two objects? one for y rotation and one for Z rotation? It might be a problem because the wheel is already fixed to the body. I'll check if i can fix objects to objects within objects
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th Oct 2017 22:47 Edited at: 30th Oct 2017 22:47
i think your problem belongs the rotation order of each axis.
if you try always a relative rotation locally for the wheel i guess it will work but it will be inaccurate after a while for the steering angle.
yes, i would try split into a hirachie.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.9.3) Radeon R7 265 : Mac mini OS High Sierra (10.13)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 30th Oct 2017 22:52
Yes, thanks markus.
I added a small plane, attached the wheel to it and used it as the Y axis then rotated the wheel along the Z axis

Login to post a reply

Server time is: 2024-04-19 18:46:15
Your offset time is: 2024-04-19 18:46:15