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 / 3DPhysicsCharacterController -- choppy motion?

Author
Message
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Jan 2020 00:23
I'm experiencing choppy motion with the 3DPhysicsCharacterController, in that it appears to stutter a bit at regular time intervals. It seems to be related to the frame rate, as setting different sync rates changes the appearance of the motion, but it's never smooth. I've also found that moving the window changes it as well, similar to changing the sync rate. I'm getting the same issue in both Studio and Classic. Here's a snippet to test (it's especially noticeable when moving left and right).

blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2020 00:52 Edited at: 16th Jan 2020 02:41
It's very weird. Sometime it seems to go smoothly and sometimes it's choppy, sometimes it starts out choppy and then goes smooth.
If you keep going forward for a bit, then backward for a bit, eventually it smooths out. Not that it's any help though

This is a ragdoll demo that i have modified to use a box like yours. It appears to work without the choppy motion. Inside there somewhere is your answer
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Jan 2020 15:12
Thanks blink0k. Unfortunately I'm seeing pretty much the same issue in the demo you linked to. Still getting a slight stutter at a regular time interval. From what I can tell, this only seems to be an issue with the CharacterController. Other physics objects I've tried seem to move as expected.
blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2020 21:21
That's odd. I don't see any stutter at all
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Jan 2020 23:13 Edited at: 16th Jan 2020 23:16
It's a very subtle stutter, but enough that I can't unsee it. But just to make sure, I took the demo you posted and added a routine to record the distance that the CharacterController moves on the x axis each frame for 120 frames (while only moving right) and then saved the results to a text file. Here's what I got:



Most frames are consistent, but there is a pattern of 0.0 distances every 25 frames.
blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2020 23:32
Why is it so obvious in your example and so subtle in the ragdoll?
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Jan 2020 23:36 Edited at: 16th Jan 2020 23:46
I have no idea. What's really odd about my example (at least on my system) is that it changes if I move the window. It starts out very, very obvious. But if I move the window, it makes it behave basically the same as your demo. Very strange.


I added the same distance recording routine to my example... here's the result before moving the window:

Very inconsistent.

After moving the window:

The same kind of pattern of 0.0 distances every 25 or so frames.
blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jan 2020 00:09 Edited at: 17th Jan 2020 00:16
Try
#renderer "Basic"
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 17th Jan 2020 00:57 Edited at: 17th Jan 2020 00:58
Interesting... While it doesn't fix it, it does make it to where it has the 0 distance every 25 frames pattern without having to move the window first. I recorded a video of what I'm experiencing here, in case it's different on other machines.

blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jan 2020 01:26
Yes. Still has that stutter every 25 frames or so. It's very disappointing.
Always finding some glitch or other with 3D physics
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 17th Jan 2020 01:47
Indeed. I was hoping to use the CharacterController for simple player collisions against a mostly static environment, so I guess I will just have to use a sphere cast setup instead. Thanks for the help though, much appreciated.
blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jan 2020 03:01 Edited at: 17th Jan 2020 03:01
Virtual Nomad
14
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 20th Jan 2020 17:39 Edited at: 20th Jan 2020 17:53
Quote: "It's a very subtle stutter ... if I move the window. It starts out very, very obvious."

i recently experienced this when i went to record some 4x footage. it got bad, glitching sound, etc, too.
around the same time, Norton had been popping (wanting to "organize" things) which i closed along with all other applications that i was running and re-booted (i also had a pending windows update in there).
from the vid, you can see that the stuttering/glitching went away (aside from in-game/my fault "stuttering").
ie, i think that other things that were running were interrupting/fighting for attention/resources (which, sometimes, tend to do at regular intervals like you described above).
so, close everything, reboot and see if it helps?
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 21st Jan 2020 00:37
Thanks Virtual Nomad. I tried that and even tested it on my Macbook and got basically the same results. I haven't noticed the same problem with other physics object types, so it seems to me that this particular issue must be some kind of bug with the Character Controller.
fubarpk
Moderator
15
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 21st Jan 2020 03:00
Create3DPhysicsWorld ( scaleFactor )

have you tried different scale factors
MerryChristmas Everyone
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Stab in the Dark software
Valued Member
17
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 21st Jan 2020 13:32
FYI: The Character controller was not originally designed to work on the static plane.
Try it on a box or terrain.
The coffee is lovely dark and deep,and I have code to write before I sleep.
hendron
4
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 21st Jan 2020 17:11
Thanks guys. I tried your suggestions (different scale factors and using a box instead of a static plane), but I'm still getting the same result. Here's an updated snippet that prints out the x-axis move distances over the last 60 frames.



My results:

Attachments

Login to view attachments
blink0k
AGK Developer
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Jan 2020 21:16
Me too

Login to post a reply

Server time is: 2020-02-26 06:59:35
Your offset time is: 2020-02-26 06:59:35