I am currently re-coding my player character, I’ve gotten to the collision message, but I haven’t been able to trigger contact point response, which is weird because I have changed very little in the message.
this is the working code from my old version:
function on_message(self, message_id, message, sender)
-- check if we received a contact point message
if message_id == msg_contact_point_response then
-- check that the object is something we consider an obstacle
if message.group == Ground then
handle_obstacle_contact(self, message.normal, message.distance)
end
end
end
and this is the new version which doesn’t work
function on_message(self, message_id, message, sender)
--Collision detection----------------------------------------------------
if message_id == msg_contact_point_response then
if message.group == Ground then
print("read")
handle_obstacle_contact(self, message.normal, message.distance)
end
end
end
I can assure you, nothing else has changed, even ‘Ground’ is just local Ground = hash("Ground")
in both versions
I’ve checked with print statements, it is has issues with getting past
if message_id == msg_contact_point_response then
in the later version
help!