About Store Forum Documentation Contact
Donations:
176$/mo



Post Reply 
[solved] Character slides when equiping shield!?!
Author Message
AndrewBGS Offline
Member

Post: #1
[solved] Character slides when equiping shield!?!
I realise this is a very weird issue.
Somehow, when I equip a shield (yes, it must be an item of type shield on the shield bone slot - equipping weapons in left hand is fine), my character starts sliding (regardless of the terrain) in the direction opposed to the shield.

Anyone has any idea why this might happen?
The major change I did to my code was change the inventory design with my own, having inventory and backack separately and using a static Item *item[20] vector instead of Memx as container. Everything else seems to work fine, except for this strange glitch.
(This post was last modified: 08-09-2013 07:00 AM by AndrewBGS.)
08-08-2013 06:51 PM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #2
RE: Character slides when equiping shield!?!
If I were to give it a diagnose, it behaves as if he's trying to move his mass centre to his mesh centre.
08-08-2013 08:23 PM
Find all posts by this user Quote this message in a reply
kasinova Offline
Member

Post: #3
RE: Character slides when equiping shield!?!
I'm thinking it has something to do with the phys of your shield being attached to your player. As in, the player phys hits shield phys and pushes away but since your shield is tied to the player, the shield also moves with the player, continuing to "push"

that's my guess. I don't know if your shield even has phys when it is equipped but never hurts to try disabling collisions once equipped.
08-09-2013 12:14 AM
Find all posts by this user Quote this message in a reply
AndrewBGS Offline
Member

Post: #4
RE: Character slides when equiping shield!?!
It bothers me that this never happened before I updated my inventory and it doesn't make sense, but it sounds like a possible explanation I guess; Now noob question, how do I disable collision..?

Oh nevermind, I figgured it; item.actor.active(false);
And it worked! Thanks a lot! (I'm still confused why I didn't have this issue before, but it's all good when things work out smile Thank you)
(This post was last modified: 08-09-2013 06:59 AM by AndrewBGS.)
08-09-2013 06:57 AM
Find all posts by this user Quote this message in a reply
kasinova Offline
Member

Post: #5
RE: [solved] Character slides when equiping shield!?!
I can't believe I helped someone for once! lol usually I'm the one in need of assistance! Glad to hear it worked though, I had a similar issue when picking up an item(non-inventory), the collision was still on so when I looked down, the item would run into my player's legs and fling him across the room. I had a feeling it was the same issue.
08-09-2013 07:31 AM
Find all posts by this user Quote this message in a reply
Post Reply