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 / Has anyone else noticed when you rotate objects on y axis it moves the fixed objects on y axis

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Dec 2018 19:37
It is more than likely just me.

But If i position objects I can fix them or not fix them and they stay in the same place
but when I fix them and rotate globally or locally on the y axis all of the joined objects
are offset by 1 on the y axis

fubar
puzzler2018
User Banned
Posted: 7th Dec 2018 19:46
Firstly i like to congratulate you in trying this puzzle

I think its cause your setting the positions to 1



Try changing the Y's 1 values to 0

puzzler2018
User Banned
Posted: 7th Dec 2018 19:51
My bad


Change the Box 11,14,17 Y position to 0

SetObjectPosition(box11,0,0,0)
SetObjectPosition(box14,0,0,0)
SetObjectPosition(box17,0,0,0)


fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Dec 2018 19:57
I understand what you are saying but I need the centre box to be at (0,0,0,)
and all the others offset from that position. the top boxes move up 1 when numpad 7 pressed
and the bottom boxes move down 1 when numpad 1 is pressed

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Dec 2018 20:00 Edited at: 7th Dec 2018 20:02


Thanks that worked


Strange behaviour tho
fubar
puzzler2018
User Banned
Posted: 7th Dec 2018 20:03
Good luck with this little project



Maybe do a solver too?
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Dec 2018 20:08 Edited at: 7th Dec 2018 20:20
Yeh maybe I found I should've just fixed all objects to the centre object box14 and always rotate
around that one.

hahah i was just thinking it would make a good example of fixed object, I really should know by now
I need all points to rotate around 0,0,0 not what I was doing

Really needs a bit of work yet so as I can keep track of what boxes have moved and their position yet
just I start with code like that which is usually quite readable then I refine and optimise etc lol and then
even I might have trouble following lol

But I have some skeleton code now just need to make a box type and array of them to help keep track
of the locations of which so I can rotate both ways etc
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Dec 2018 14:32 Edited at: 9th Dec 2018 06:31
A simple Rubiks Cube Puzzle


code needs a bit of refinement but its works and altho it don't texure the faces like an actual rubiks cube it does work like one
but would need to add the rotations instead of just moving when proper texture facing is used
fubar

Login to post a reply

Server time is: 2024-04-19 14:07:55
Your offset time is: 2024-04-19 14:07:55