Re: Grenade Throw Indicator

#2
Indeed you can activate the throw trajectory using the CVar:
i_grenade_showTrajectory 1

You may also need to disable real geometry in the trajectory debug with this CVar to be able to see it:
i_greande_trajectory_useGeometry 0

Essentially the game creates a dummy object of the same type (the grenade), it then manually calculates physics steps for this time given its physical parameters (start velocity/mass etc).
It does these steps in a loop until the entity stops moving or max steps is reached (set to 200 steps). As it does this, it records the information so it can draw a line for it's position.

The relevant code for stepping through physics for an object manually is here:
https://github.com/CRYTEK/CRYENGINE/blo ... .cpp#L3301
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron