Hello, dear people of this forum.

Sorry for bad English, because I still do not know your language, I communicate with you through an interpreter. (Thanks for understanding)

I am still very bad sort and Panda3d and python, and I very much need your help.

I have to ask you, could you show the code with a working physicist. Ie a box falls ае a plane (the ground).

Of course thanks to you, dear, but before opening the topic, I looked through all the manuals, which you gave me links. I would like to consider the standard physics + collision (not ode), and to see a small, fully working code, preferably with the comments that I finally grasped how to operate the standard physics.
Thanks

I very much suggest you using ODE for everything that goes further than zone triggers.

It may sound easier to use built-in physics, but we (a buddy and me) had a hard time understanding Panda’s ideas behind the ActorNode and the way Panda handles physics in general.
That said ODE was really quite intuitive and simple to use. (Though I must admit, I haven’t used ODE for collisions yet, only for physical calculations.)

Long story short: try out ODE.
I doubt you’ll regret that choice.

Thank you persuaded me, but I have a new problem.
I wrote the code, based on the code this in the manual, the code runs without error, but runtime error ,, help please, can I do something wrong? Thank you for your attention and help!

``````from direct.directbase import DirectStart
from pandac.PandaModules import OdeWorld, OdeSimpleSpace, OdeJointGroup
from pandac.PandaModules import OdeBody, OdeMass, OdeTriMeshData, OdeTriMeshGeom
from pandac.PandaModules import BitMask32, CardMaker, Vec4, Quat
from random import randint, random

# Setup our physics world
world = OdeWorld()
world.setGravity(0, 0, -9.81)

# The surface table is needed for autoCollide
world.initSurfaceTable(1)
world.setSurfaceEntry(0, 0, 900, 0.0, 9.1, 0.9, 0.00001, 0.0, 0.002)

# Create a space and add a contactgroup to it to add the contact joints
space = OdeSimpleSpace()
space.setAutoCollideWorld(world)
contactgroup = OdeJointGroup()
space.setAutoCollideJointGroup(contactgroup)

do.reparentTo(render)
do.setPos(0,0,20)

land.reparentTo(render)

doBody = OdeBody(world)
M = OdeMass()
M.setSphere(30,10)
doBody.setMass(M)
doBody.setPosition(do.getPos(render))
doBody.setQuaternion(do.getQuat(render))

doTrimesh = OdeTriMeshData(do, True)
doCol = OdeTriMeshGeom(space, doTrimesh)
doCol.setBody(doBody)

landTrimesh = OdeTriMeshData(land, True)
landCol = OdeTriMeshGeom(space, landTrimesh)

# Set the camera position