Hello,
I'm new at programming with gideros, but I really like it
I'm reading the book Gideros Mobile Game Development and I really like it, but I don't understand how to create a physics object. How can I do this?
I hope you could answer my question
Thanks in advance for answers
Comments
Sure
First you include box2d library:
on each frame
I typed in everything you wrote, but my image isn't moving
I don't get errors.
I hope you can help me again.
Thanks in advance
local x=5
function foo()
local x
print (x) -- nil
end
Here the intent was to access the outer x set to 5 but because of the inner local x, this value is hidden. It is not an error to access x but its value is nil when printed.
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
I'll try it later
I have another question.
I wanted to know if I can program that every 1 second the player sprite moves up a little bit (or something like this)?
It works now
Thanks for your help!
I have another question:
How can I make, that my player object is rotating around itself while you touch it?
If I do this with set Rotation, it rotates, but with every touch the sprite walks closer to the end of the screen and then outside of it.
I hope you can help me again
Does anyone know why?
It worked after I used:
body:setAngularVelocity(3)
Thanks for your help
Is there a way to let the sprite only rotate, if you "draw" circles on the touchscreen with your finger? I tried it, but I can't figure out, how I have to do it.
Thanks in advance
http://appcodingeasy.com/Gideros-Mobile/Detecting-Gestures-in-Gideros
And when you detect circle, apply angular velocity
I'll try it later.
My problem is the gideros player. It doesn't work. If I click play, I always get the message, that it doesn't react and asks me if I want to close it. It worked yesterday evening and it works fine with any other projects. (
I hope you can help me
Well it is possible you ran into some C++ mess associated with Box2d underneath.
So something you added to the code breaks it, you can either try backing back until you see it works or you can post your code/project for us to check
Thanks ar2rsawseen for your great help.