If possible please add in message array (from contact_point_response) the id of the other(s) collision object the participated of the collision moment… maybe something like:
message.other_collisionObject: …
or
message.others_collisionObject: …
here is my last topic, where this feature would make diference…
I don’t know if I understand correctly your question, but you might be refering to the already implemented other_id parameter that already comes in the collision information received on every contact_point_response event.
No, I don’t understand what you are trying to ask, sorry.
But I’ll expose 2 cases:
1.- hero receiving dino
in this case, in your hero.script’s on_message function, you get: sender == any of the hero’s collisions, for example: msg.url(“main:/hero#branchHead”)
and other_id == dino_url for example url [main:/instance1]
2.- dino receiveing hero
in this case, in your dino.scripton_message you get: sender == your dino collision object, for example: url [main:/instance1#collisionobject]
and other_id == the player’s url, for example url [main:/hero]
And that’s it… I don’t understand the remaining part of your question.
I just want access #branchHead (other.fragment_colission_id) from dino. today this it is impossible to do (i guess).
(what fragment touch my fragment?..(sensor/objectCollision))
I kind of get it, I myself have been having struggling with a very similar situation.
I ended up with something like (pseudocode arranged):
hero.script
on_messsage(...)
if message_id == contact_point_response then
if message.group == dino then
if sender == url_feet then
msg.post(message.other_id, "STUMP", { part = FEET })
elseif sender == url_head then
msg.post(message.other_id, "STUMP", { part = HEAD})
dino.script
on_message(...)
if message_id == "STUMP" then
if message.part = FEET then
-- perform action when stump by hero's feet on myself...
elseif message.part = HEAD then
-- perform action when stump by hero's head on myself...
You just have to adapt your thinking to the message passing benefits of Defold!