Jump to content

FPS example not flexible and too complex


photo

Recommended Posts

Hi,
 

Having used Unity, the FPS sample is way too much coding and really not flexible, all is hard coded.

Same example making it more flexible  :
- Create capsule object visible in editor
- Add physics constraints on rotation to only rotate on Y for the capsule
- Create camera object and adjust it's properties
- Drag and drop camera as child of capsule component and adjust it's position

For the coding aspects a basic FPS does not need all crouch code, or slopes code
- Add script to move capsule according to player inputs
- Add script to camera object to control effects

The example is not component oriented, a simpler fps controller more components oriented is better for starters.

Also can't we import Mathlib instead of having everywhere in code to type "Mathlib" ?
Less code is better.

This is how it is done using components

image.png.59a7904aab795921acd1013d49e3d013.png

Edited by Deve3D
Link to comment

Deve3D

Thanks for the feedback! For sure there is always a room for improvements. Modular approach sound interesting, we will definitely take a closer look in this direction.

You can also share your results once you'll finish your adjustments :)

 

Quote

Also can't we import Mathlib instead of having everywhere in code to type "Mathlib" ?

Unfortunately, that will lead to a different issue - you will not able to use using Unigine; anymore (Log.Message, for example). MathLib is a class, not a namespace. 

 

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...