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 / Rotate door help

Author
Message
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 3rd Aug 2020 11:42
One problem after another lol

That's all about learning I guess

Ok, so, rotate a door out ward?

I can rotate a door, but it rotates around its self

Here is my bad code

I just need the doors to open and close

PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 3rd Aug 2020 17:59
Quote: "I can rotate a door, but it rotates around its self"


not sure exactly what you mean by that, do you mean it rotates around its center??

If so, you need to set your doors point of origin to the hinge side of the door?
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 3rd Aug 2020 19:51
How do you set a point of origin, im lost on this issue.

in frag-motion?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Aug 2020 23:39
FixObjectPivot()
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 4th Aug 2020 02:07
I use FixObjectPivot() and my model disappear

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Aug 2020 03:26
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 4th Aug 2020 03:40
lol, that works

blink0k

Thank you

I can see you set object pivot after moving them then calling the rotate.
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 4th Aug 2020 04:04
Ok, that works but the door is rotating on the wrong side lol

it is rotating at the door handle not the door hinge .

I tried to rotate it at many different angles before I setobjectpivot but it does nothing
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Aug 2020 07:13 Edited at: 4th Aug 2020 07:14
MoveObjectLocalX(door, -3)

Imagine the point at 0,0,0 will be your pivot. Move your object so that 0,0,0 is your pivot point
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 4th Aug 2020 13:04
Thanks, I just loaded it up into frag-motion then rotated it around but I will keep this as a learning lesson.

Login to post a reply

Server time is: 2024-11-21 12:30:33
Your offset time is: 2024-11-21 12:30:33