Jump to content

[Help] about move charter by mouse


witawat
 Share

Recommended Posts

Look at the wiki entry on Input

 

These commands give you access to the keyboard and mouse. Once you can detect the mouse buttons then the rest should be straight forward.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

First of: which programming language?

 

Here are some C# examples:

 

Picking snippet:

TVec3 pickPos;
if (LE.MouseHit(Mousebuttons.MOUSE_LEFT))
{
  if (LE.CameraPick(out pick, camera, new TVec3(LE.MouseX(), LE.MouseY(), 1000), 0, 0, null) == 1)
  {
       pos = pick.position;
  }
}

 

 

Looking at it using: PointEntity()

TPivot pivot = LE.CreatePivot();
LE.PositionEntity(pivot, pickPos)

LE.PointEntity(characterModel, pivot, 2, 5, 3 ) //2 is the Y axis, 5 is rotation speed, 3 is roll

 

 

Moving the entity towards the picked position:

LE.MoveEntity(characterModel, new TVec3(0,0,5), 1) //move on the local axis

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...