This site requires JavaScript, please enable it in your browser!
Greenfoot back
karolis
karolis wrote ...

2014/3/9

Need help using vector

1
2
danpost danpost

2014/3/9

#
karolis wrote...
so i used this code for my comparison
getMovement()
but i am comparing it to an integer value using the '<' operand, which are not compatible, how may i resolve this?
'getMovement' returns a Vector object. It does not have a numeric value (though it may contain one or more -- which it does). If you notice, the 'getSpeed' uses 'getMovement().getLength()' or 'movement.getLength() which extracts the particular value from the object.
karolis karolis

2014/3/9

#
ahh yes, thank you, very useful how you explain everything too :)
You need to login to post a reply.
1
2