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 / [SOLVED] 3D Physics Slider Joint Troubles

Author
Message
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 25th Apr 2020 23:35
Hello, I'm hoping someone can please explain why I can't seem to get the attached Linear Slider Joint to work.

Attached is a mock up of what I'm working with, and I apologize that I don't have much for consistent results to even describe the problem.

When I run the attached and I DON'T MOVE THE MOUSE, then I can operate the slider no problem. I can move around the camera to an extent with my clumsy little camera keys, but then sometimes the slider joint just stops working. Sometimes its when I move the mouse over the window.

I'm really struggling with this one, I'm hoping it is something simple that I've overlooked. Full disclosure - I've only been into working with 3D in AppGameKit for about a month so taking small steps here.

Any help would be greatly appreciated!

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Apr 2020 04:58
This post has been marked by the post author as the answer.
SetObject3DPhysicsCanSleep(sliderDoor, 1)
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 26th Apr 2020 15:37
Fantastic, thank you for this blink0k! I'll try to sneak an Easter egg in my game in your honor for this

I had not caught the fact that by default dynamic objects get put to sleep by the physics engine. Using SetObject3DPhysicsCanSleep(sliderDoor, 0) when declaring the dynamic object keeps it from going to sleep and solves the problem. I'll spend some time learning about the sleeping thresholds related to this.

Thanks for the quick reply and stay safe everyone!
John

Login to post a reply

Server time is: 2024-04-18 18:38:26
Your offset time is: 2024-04-18 18:38:26