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 / Rotation about on an Arbitrary Axis in 3D?

Author
Message
gamergod88
8
Years of Service
User Offline
Joined: 28th Apr 2016
Location:
Posted: 28th Apr 2016 20:17
Hello! Is there a command for Arbitrary Axis Rotation or some way to do it? Thanks in advance.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Apr 2016 07:55
Somebody could tell you the right way to do it with maths.
But I often cheat. Connect 2 objects together with a fixed joint. Rotate the central one and get the coordinates of the other.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Apr 2016 09:44
You could setspriteoffset() and then setspriteangle() to set the rotation
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Apr 2016 09:50
Remember those local axis movements on 3D objects. Like, if you position an object where you need the centre of rotation to be, then rotate it, and move it for the local X Y Z, you can do it with fairly minimalist commands. Considering the maths involved verses just position, rotate, offset - it's a no brainer for me. You can of course position an object with another object, with local X Y Z offsets - like putting a plain at a specific location on a model and then billboarding it to face the camera, like a light effect or something.

The MoveObjectLocalX, Y, and Z commands are very, very useful.
gamergod88
8
Years of Service
User Offline
Joined: 28th Apr 2016
Location:
Posted: 29th Apr 2016 11:16
Wow ! Thanks for all your help and such quick replies!
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 2nd May 2016 16:55
Here is a code snippet from the help files, should do what you need.


The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-11-24 02:08:01
Your offset time is: 2024-11-24 02:08:01