Hello!
I'm having a problem with the code in B4i exactly with the linear velocity function of my character. I have the code that I already created in B4A and B4J, where in a new character class in some events I need to confirm the linear movement in X or in Y independently (bw.body.linearvelocity.x = 1, or bw.body.linearvelocity.x = 3). In B4A and B4J it works, but when I run it on my iphone (the compilation does not cause a problem), my character simply does not move. I tried setting the full vector (X2.CreateVec2 (1,0)) but my character doesn't move either. Setting this up in the main game class does work on the iphone. The downside is that I already have the code created in the character class that works on android and pc, and it would be very tedious to rewrite all the code and re-establish the logic if I pass the velocity vector to the game class. Why doesn't this command work in my character class? I appreciate any comments!
I'm having a problem with the code in B4i exactly with the linear velocity function of my character. I have the code that I already created in B4A and B4J, where in a new character class in some events I need to confirm the linear movement in X or in Y independently (bw.body.linearvelocity.x = 1, or bw.body.linearvelocity.x = 3). In B4A and B4J it works, but when I run it on my iphone (the compilation does not cause a problem), my character simply does not move. I tried setting the full vector (X2.CreateVec2 (1,0)) but my character doesn't move either. Setting this up in the main game class does work on the iphone. The downside is that I already have the code created in the character class that works on android and pc, and it would be very tedious to rewrite all the code and re-establish the logic if I pass the velocity vector to the game class. Why doesn't this command work in my character class? I appreciate any comments!