Jump to content

Missile code :


YouGroove
 Share

Recommended Posts

Anyone have some liens of code for missile launch ?

I mean the model is created in front of player in the direction of the player and it moves to some model target in a direct line.

 

In fact the code i need is how to create it in front of player and with the direction the player faces ?

Stop toying and make games

Link to comment
Share on other sites

1. Set the matrix of the missile to be the same as the character / object firing it..

2. Move the missile to whatever offset you want. i.e. the character position will be on the ground because of the controller you'll have to offset it to be in front of your cannon.

 

All the functions you require are here under Movement: http://www.leadwerks...ference/entity/

 

Alternatively if you can get the position of the "cannon", if there is one, then you would base your offset from there.

 

Sorry I don't do lines of code.. That's for you to figure out. After all I don't even own LE3 but regardless of engine that is what you would do.

  • Upvote 1

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...