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.

DarkBASIC Professional Discussion / Glue object to limb not working

Author
Message
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Mar 2016 04:52 Edited at: 1st Mar 2016 04:54
Hi, I am back since a few months ago, I am developing a new free to play game and I have a problem.

I need to have a character following the movements and rotation of a big boat, so basicly the character should be able to walk on the boat but obviously his position should be affected by the movement of the boat (when moves or rotates).

I am trying to do this using "glue object to limb", but nothing is working, I have taken a look at all the old posts about his but none has been usefull.

If I try to rotate the boat, the player does not stick on the point where it should be, but follow a weird direction (unless I am positioned exactly in the center where the pivot is).
If I try to move the boat forward, the character does not move at all, it just stay in his position.

How can I let the player follow the boat movements and rotations but still allow him to walk on the boat?
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 1st Mar 2016 05:36
Something like this


Or you could keep the boat in the same position and move the world around. I wouldn't use glue object to limb for something like that.
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Mar 2016 06:47
The moving part was the less important, I know I could do that way but I was hoping to manage both position and rotation with the glue object to limb command.
The main problem is the rotation of the boat, how can I "attach" the player to a certain point of the boat if the boat rotates? The player needs also to walk so the position should be relative to the boat and not a static position.

The "sliding world" option also would not work because there will be different boats and all of them needs to move with players on them. (but this is still related to the position problem which is not actually a problem, my problem is the rotation)
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Mar 2016 08:22
I have been able to fix the problem making my own formula, now the Tricky things to fix are the collisions that seems to be not accurate as before somehow, even if the collision boxes are rotating with the boat.
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 1st Mar 2016 08:28
Nevermind, I was forgetting to adjust the rotation of a cube I use to detect collisions with the intersect command with the rotation of the boat. When I get stuck somewhere I Always go panic

Login to post a reply

Server time is: 2024-04-20 07:26:51
Your offset time is: 2024-04-20 07:26:51