Rules FAQ Members List Search Register Login

 Raised This Month: \$248 Target: \$400 62%

Author Message
Rogerbot
New Member
Join Date: Jul 2020
 07-22-2020 , 18:34   [CS:GO] Calculate jump distance(long jump) #1 Is it possible to calculate the distance only starting from the red line (https://prnt.sc/tmv7qq), if someone is running in the white part and jumps before the red line only calculates the distance between the red line and land position, something like this: https://previews.123rf.com/images/ar...ustration-.jpg
Kellan123
AlliedModders Donor
Join Date: Aug 2012
 07-23-2020 , 10:23   Re: [CS:GO] Calculate jump distance(long jump) #2 Last edited by Kellan123; 07-23-2020 at 10:23.
Rogerbot
New Member
Join Date: Jul 2020
07-23-2020 , 15:51   Re: [CS:GO] Calculate jump distance(long jump)
#3

Quote:
 Originally Posted by Kellan123 https://sm.alliedmods.net/new-api/ve...VectorDistance
I've seen that when i was searching for this, but how do i get players landing position and if i use that how can i make it so when players jump from different positions like these https://prnt.sc/tngwut (red line is where they jump, green and blue is the air time and yellow is the landing) end up with the same result so the player that jumped diagonally doesn't get more distance.
I don't know if i was clear, english isn't my first language and thank you for the response.
Veteran Member
Join Date: Nov 2012
 07-26-2020 , 11:00   Re: [CS:GO] Calculate jump distance(long jump) #4 You can calculate the trajectory and then trace it against a solid surface. Here is a small explanation https://translate.google.com/transla...st%2F131931%2F Read the description below the image with jumping mario. Use TR_TraceRay to get an intersection point with a solid surface. The information you need is in these properties: m_angAbsRotation - player angle m_vecAbsOrigin - player position m_vecAbsVelocity - player velocity m_flGravity - gravity m_flFriction - friction GetGameTime() - engine time To get the jump moment hook PlayerRunCmd and check if IN_JUMP button is pressed. Alternatively you can use m_hGroundEntity property. It is only valid when player is on the ground. If the surface is curved, use TR_TraceHull, it will give a more precise result. And one more thing - players can change their trajectory while in the fly. To make sure it doesn't happen, return Plugin_Handle in PlayerRunCmd. Last edited by kadet.89; 07-26-2020 at 11:10.

 Thread Tools Display Modes Hybrid Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans / SourceBans++             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TFDodgeball         TF2Items         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 04:53.

 DMCA - Archive - Top