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 Studio Chat / Rotating a kinematic body around it's X axis fails

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Oct 2020 08:24 Edited at: 19th Oct 2020 09:41
Either that or i'm doing something very wrong. Attached is an example

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 12th Nov 2021 01:25 Edited at: 12th Nov 2021 01:37
Your using non physics commands on a physics object, try using "SetObject3DPhysicsAngularVelocity"


Edit, and if you figure out how to use that function, please post your results, I cant get it working!

if ?
Quote: "Debug3DPhysicsWorld

Call in loop before step physics. Draws the debug overlay of the 3D physics world. Note: This command does not currently work needs the ability to draw wireframe in AGK."


What was to point of including it then?, without anyway to debug physics there is no way to truly know whats going on

GG Max has wireframe!, just add the dam functions!!
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Nov 2021 02:00
Quote: "Your using non physics commands on a physics object, try using "SetObject3DPhysicsAngularVelocity""

It's a Kinematic body. It doesnot respond to forces
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 12th Nov 2021 02:43
Ok, well it looks like the physics shape is not moving, the smaller boxes lift a little and then drop through but sometimes other boxes hit it when at an angle and bounce off, its odd for sure, without debug its all just guesswork

Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Nov 2021 19:08
There is indeed something very wrong. I posted it in the GitHub
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 13th Nov 2021 05:26
It rotates for me on every angle.

windows 10
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Nov 2021 05:33 Edited at: 13th Nov 2021 05:39
GCh wrote: "It rotates for me on every angle."

the problem isn't the object

PTC wrote: "the physics shape is not moving"

(or rotating?)
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 13th Nov 2021 06:12
Well there does appear to be some movement because the boxes lift slightly then just drop through, maybe its out of sync or offset, I did take a look at the source but stabs code is above my paygrade!!
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 13th Nov 2021 16:25 Edited at: 13th Nov 2021 16:32
You need to use SetObjectRotation():

SetObjectRotation(x1, GetObjectAngleX(x1) + 0.5, GetObjectAngleY(x1), GetObjectAngleZ(x1))

And then the physics object matches up with the drawn object. I think the RotateObjectLocal should be functional tho so agree its a bug.

I tried to get yours working and ended up re-writing, came up with this:
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Nov 2021 19:39
Thanks jd_zoo. very helpful

Login to post a reply

Server time is: 2024-04-19 01:25:40
Your offset time is: 2024-04-19 01:25:40