It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
I have defined the player physics like this:
[Player]
Position = (0, 0, 0)
Scale = 1
AnimationSet = PlayerAnimationSet
[PlayerAnimationSet]
Texture = avion_sheet.png
FrameSize = (64, 64, 0)
PlayerIdle = 2
PlayerMoveFast = 2
StartAnim = PlayerIdle
Pivot = center
Body = PlayerBody
[PlayerBody]
PartList = PlayerBodyPart
Dynamic = false
[PlayerBodyPart]
Type = box
Solid = true
SelfFlags = hero
CheckMask = ufo
With [Physics] / ShowDebug
at true, i don't see neither the physic debug shape, nor coordinates axis.
That's odd, because with simpler objects (ufos which have no animations, body defined in the object entry) , i can see the physic shapes.
[Ufo]
Graphic = UfoGraphic
Body = UfoBody
Pivot = center
[UfoBody]
PartList = UfoBodyPart
Dynamic = false
[UfoBodyPart]
Type = sphere
Solid = true
SelfFlags = ufo
CheckMask = ufo # hero
And it gives that:
I'm not sure where i should define Physics.
I tried to define Body
in [Player]
but with a box type, it raises an assert (no assert with sphere, strangely). Anyway, i see only coordinates axis in this case, not the debug shape.
Thank you for reading
Comments
Are you seeing any warning message about this when running in debug by any chance?
In any case, lemme venture a guess.
As you do not define any dimensions for your body part, orx will then look at the object's
Graphic
in oder to select one automatically based on theGraphic
's side. However, your plane doesn't have aGraphic
. I think that is the root of your issue.Thank you for the answer.
I have no messages in debug, but as you know, i'm using Nim so maybe there is less verbosity in debug.
I tried to add TopLeft and BottomRight to bodypart, with no visible change (i tried with full and then with a vector, but that doesn't change).
Mmh, the lack of warning message with a debug build is going to make your life difficult in the future.
Regarding
TopLeft
andBottomRight
:full
without a graphic/size as orx has no mean to retrieve this information (that's the default settings, btw)DimensionRatio
setting)Thank you the time you've spent on this. As we have discussed on Discord channel too, i post the solution you've found for getting physics applied to the plane:
Now that all is set correctly in the ini, i have just to find why the physics events are not triggered
My pleasure! Glad it's working now.