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 / (Physics)Moving a Sphere Problems

Author
Message
Dark_ITheI _Angel
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 12th Dec 2022 01:08
Some Questions About it and a Bug.

-When i try to move around with Up,Left,Right,Down, There is some invisible object colliding with me. The ball slide around it but i dont know where is comming from.
-In the command Create3DPhysicsCharacterController it says, The ObjOffsetVec3 is half the amount , But when setting it at 50 (half of 100, offset in the Y direction), the ball
goes through the floor, stopping further down, when set at 0 it works ok, any idea or am i understanding it wrong?
-Also Adding x and z in Move3DPhysicsCharacterController just bugs the movement.

Here is the code , No external models needed :



Btw, Movements are just strafe left strafe right... how could i make them not be strafe?
And in the end of the code, How can i get the print command to update the camera position and print it so that i can position the camera more easy in the world instead of guessing.


many questions but its the nature of the thing, am having a hard time with physics and collisions and VECTors 3 just not working as expected FMPOV.

Thanks in advance ,



Animals
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 12th Dec 2022 02:35 Edited at: 12th Dec 2022 02:40
have you seen the (Bullet 3D) Physics Demos attached to THIS POST?

the controller demos inside are the extent of my experience with them.

perhaps worth mentioning, character controller objects are the only 3D object that we can visually (natively) debug, per se.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 12th Dec 2022 11:04
I made a couple little changes to your code. Maybe it works now?
CameraX, CameraY and CameraZ are now updated in the loop.
And Vec3Bola = CreateVector3(0,0,0)

BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Dark_ITheI _Angel
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location:
Posted: 12th Dec 2022 22:21
@Ando,

Thanks, you always helping, it works perfect,.. so it has to be in the loop, now that you change it,somewhat logical,it needs to call the position everytime but i was thinking the +str(CameraXYZ) command,being in the loop,would take that job.
Regarding Vec3,i thought is about giving the size of the object and its position so that agk knows where to collide,i dont get why its all at 0 when the sphere is not at 0 or its size.. but it works, guess am going to have to look some exemples.

@Virtual Nomad,
Thanks for the hint, Just downloaded... Am sure i will find many answers there,just starting with movements .
Animals

Login to post a reply

Server time is: 2024-03-29 05:25:09
Your offset time is: 2024-03-29 05:25:09