Jump to content

Some problems with controllers


Arska134
 Share

Recommended Posts

Hello!

 

I need to ask you guys how i can point my controller to facing another. I made zombies in my game with controllers. Is it even good idea? I came up with idea of using controllers, because it's easy to determine if zombie is falling or crouching. But now i have some problems when i am trying to make zombies follow player model.

 

I'll stick with controllers, or something else?

 

Thanks.

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Link to comment
Share on other sites

Use PointEntity() on the zombie model on the Y axis. Then use the zombies Y rotation value via (EntityRotation(zombie).Y) for the rotation value to use for the controller. This will point the model and make moving "forward" with the controller move towards the player.

Link to comment
Share on other sites

pointEntity(zombie,playerl,3,1,0)

UpdateController(zombie.control,zombie.rotation.y,2.5, 0, 500,1,0)

Hmm... when i use maxacceleration 500 zombie launches to another planet straight away. O_O

 

Without that, zombie changes direction pretty slowly. :/

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Link to comment
Share on other sites

Try a lower value like 100. The speed of 2.5 can also be changed possibly to a lower number.I just played around with these values till I got a good result. Didn't really know what I was doing. But it works fine.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
Share on other sites

Try a lower value like 100. The speed of 2.5 can also be changed possibly to a lower number.I just played around with these values till I got a good result. Didn't really know what I was doing. But it works fine.

Even with maxacceleration of 1, it still flys sky high. :D

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Link to comment
Share on other sites

Are you still parenting? Parenting can lead to some funky stuff sometimes. Worth a shot to unparent if you are still doing it. Other things like mass maybe? Been awhile since I used controllers so can't remember off the top of my head.

Link to comment
Share on other sites

Are you still parenting? Parenting can lead to some funky stuff sometimes. Worth a shot to unparent if you are still doing it. Other things like mass maybe? Been awhile since I used controllers so can't remember off the top of my head.

I am not parenting them anymore.

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

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