My collider does not replace (SOLVED)

#1

Hello,
I test the collisions between my character in kinematic and an obstacle in static. I reposition my gameObjet well but my collider stays there.
Thank you for your help

function on_message(self, message_id, message, sender)
if message_id == hash(“contact_point_response”) then
if message.distance > 0 then
local newpos = go.get_position() + message.normal * message.distance
go.set_position(newpos)
local col=go.get_position(#collisionobject)
print(col)
end
end
end

colliderDefold

0 Likes

#2

hi! how are you moving your game object?

0 Likes

#3

with this code

https://pastebin.com/FWeUUPxi

0 Likes

#4

I found my error, I forgot to update my Vector3 pos in my update function

pos = go.get_position()

sorry for inconvenience
Thank you

2 Likes

#5

hey dude! well done for solving it yourself. Let us know if you need anything else.

3 Likes

#6

Feel free to add (SOLVED) to the post title :slight_smile: I’ll do it this time, but for future reference. And gj!

3 Likes