Description: Official subforum for LunaLua - an extension framework for SMBX Engine Version 1.3 (which a core of SMBX 2.0). Share your creations that require the use of LunaLUA. You may also share info/tutorials on how to use LunaLUA.
Moderators: Moderators, Semi-moderatos
I have a script in onTickEnd that attaches some hitboxes to the player with colliders.lua. The hitboxes still seem to be positioned in the player's position before the physics calculations are made. Since I switched from onLoop I don't see any difference between the two. The hitbox positions lag behind the player in either event. Oddly, the hitboxes seem to be in the correct position until the camera begins to move. (?) I know this isn't just an issue with drawing the hitboxes, as I have tested for this. The hitboxes break a block on collision with it, and they surround the player, but if moving fast enough, he will collide with the block before it breaks.
I used to use onLoop and add the player's speed to the hitbox position to fix it, but someone said this wasn't always accurate. Are there any conditions in which this method wouldn't work? Is the player's movement with a layer or NPC he's standing on not calculated in the player's speed fields? (Sorry, Hoeloe. It's not that I think you're wrong, I just want to double-check)
Who is online (over the past 5 minutes)
Users browsing this forum: 1 guest