Tutorial Requests

I need full example for Physics and Director version 1.2 … when I run physics with Director 1.1 my app always crash!!

I want clean approach of how to use Director 1.2 or 1.3 with Physics engine.

Best Regards,

Admin6 [import]uid: 45018 topic_id: 4786 reply_id: 36464[/import]

@slojoe1559 So I am trying your solution, but I am getting an error here:

velysquared = (vmax^2/d^2)(dx^2+dy^2)/(1+dx^2/dy^2)

I tried a couple things:
– Moves player, but not at the point of “touch”
velysquared = (vmax^2/d^2) * (dx^2+dy^2)/(1+dx^2/dy^2)

– Moves player, but not at the point of “touch”
velysquared = (vmax^2/d^2) + (dx^2+dy^2)/(1+dx^2/dy^2)

– Does not move player
velysquared = (vmax^2/d^2) / (dx^2+dy^2)/(1+dx^2/dy^2)

Neither these seem to give the desired effect when I tap the screen. I understand this was late when you wrote this. any ideas what I need to do here?

[import]uid: 53149 topic_id: 4786 reply_id: 36469[/import]

@spenggong - The basic gist of it is I screwed up and made things more complicated than needed to be. Opened up a new thread, please take a quick look and let me know if you have any questions.

http://developer.anscamobile.com/forum/2011/05/13/player-movement-touch [import]uid: 39394 topic_id: 4786 reply_id: 36485[/import]

@spenggong - the ‘transition.to’ function (to the best of my understanding) moves, in this case, p to the point touched without checking for collisions with other objects. The options I mentioned previously will physically move your player and will not allow it to move through the static walls.

The function you choose to use depends on exactly how you want to move. These will involve a bit of math, but i’ll throw a quick example in the following: (deleted incorrect code and moved to new thread)

http://developer.anscamobile.com/forum/2011/05/13/player-movement-touch
[import]uid: 39394 topic_id: 4786 reply_id: 36411[/import]

Sorry I missed this whole discussion, have been away. Will check out the other thread.

@admin6 - The Viewer app uses both Physics and Director 1.2, to get started you can have a look at that however there will be a tutorial coming soon about using Director written by a Lime user. [import]uid: 5833 topic_id: 4786 reply_id: 36630[/import]

Any chance of a tutorial that shows a sprite falling off screen or reaching the end of the screen, and displaying a Try again or Continue to next level button? [import]uid: 72845 topic_id: 4786 reply_id: 60197[/import]

You could do that fairly easily with physics. Just detect for a collision with the player and an invisible sensor off screen and then bring up a new Director scene. Or without physics you could detect when the players Y position is higher than the screen height and then load up the scene. [import]uid: 5833 topic_id: 4786 reply_id: 60742[/import]