Any good method to determine current player is standing on sth.? #1068
-
Hi: Is there any built-in mechanism to determine whether player is standing on sth.? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, If the entity in question uses PhysicsComponent, then you can add a ground sensor: FXGL/fxgl-samples/src/main/java/sandbox/PlatformerSample.java Lines 201 to 205 in 8bda931 Then check: FXGL/fxgl-samples/src/main/java/sandbox/PlatformerSample.java Lines 122 to 124 in 8bda931 If the entity does not use PhysicsComponent, then what you are doing is probably a good approach. |
Beta Was this translation helpful? Give feedback.
Hi,
If the entity in question uses PhysicsComponent, then you can add a ground sensor:
FXGL/fxgl-samples/src/main/java/sandbox/PlatformerSample.java
Lines 201 to 205 in 8bda931
Then check:
FXGL/fxgl-samples/src/main/java/sandbox/PlatformerSample.java
Lines 122 to 124 in 8bda931