-
Notifications
You must be signed in to change notification settings - Fork 211
Discuss about rvx, rvy
in collection-map.js
#99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is not a real PR
Maybe "rvx" means "reference to vx", since the value appears to come from "vx" on line 44.
…-------- Original Message --------
On 3/25/25 9:46 PM, finscn wrote:
Discuss about rvx, rvy in collection-map.js
there is a function with arguments named rvx, rvy , What do they mean? what's the full name ?
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L63
_traceStep
:
function
(
res
,
x
,
y
,
vx
,
vy
,
width
,
height
,
rvx
,
rvy
,
step
)
---------------------------------------------------------------
the _traceStep() be called with vx & vy
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L44
this
.
_traceStep
(
res
,
x
,
y
,
sx
,
sy
,
objectWidth
,
objectHeight
,
vx
,
vy
,
i
)
;
Why do you pass vx , vy ? in my opinion , at line 44 , It should pass sx ,sy
---------------------------------------------------------------
the function _traceStep has arguments rvx, rvy , and pass them into _checkTileDef()
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L95
_traceStep:
function
(
res
,
x
,
y
,
vx
,
vy
,
width
,
height
,
rvx
,
rvy
,
step
)
{
// ......
this
.
_checkTileDef
(
res
,
t
,
x
,
y
,
rvx
,
rvy
,
width
,
height
,
tileX
,
tileY
)
// ......
}
Why do you pass rvx , rvy ? in my opinion , at line 44 , It should pass vx ,vy.
—
Reply to this email directly, [view it on GitHub](#99), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAMXA25HTIDBSKGPG3DGQTD2WFT5NAVCNFSM6AAAAABZX2PXHSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE2DMNZZGU4TGMA).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[finscn]finscn created an issue [(phoboslab/Impact#99)](#99)
Discuss about rvx, rvy in collection-map.js
there is a function with arguments named rvx, rvy , What do they mean? what's the full name ?
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L63
_traceStep
:
function
(
res
,
x
,
y
,
vx
,
vy
,
width
,
height
,
rvx
,
rvy
,
step
)
---------------------------------------------------------------
the _traceStep() be called with vx & vy
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L44
this
.
_traceStep
(
res
,
x
,
y
,
sx
,
sy
,
objectWidth
,
objectHeight
,
vx
,
vy
,
i
)
;
Why do you pass vx , vy ? in my opinion , at line 44 , It should pass sx ,sy
---------------------------------------------------------------
the function _traceStep has arguments rvx, rvy , and pass them into _checkTileDef()
https://github.com/phoboslab/Impact/blob/7768fd29c70ca924a78673d93081baab5a72fbe6/lib/impact/collision-map.js#L95
_traceStep:
function
(
res
,
x
,
y
,
vx
,
vy
,
width
,
height
,
rvx
,
rvy
,
step
)
{
// ......
this
.
_checkTileDef
(
res
,
t
,
x
,
y
,
rvx
,
rvy
,
width
,
height
,
tileX
,
tileY
)
// ......
}
Why do you pass rvx , rvy ? in my opinion , at line 44 , It should pass vx ,vy.
—
Reply to this email directly, [view it on GitHub](#99), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAMXA25HTIDBSKGPG3DGQTD2WFT5NAVCNFSM6AAAAABZX2PXHSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE2DMNZZGU4TGMA).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Regarding your pull request, the _traceStep function takes 10 arguments, so I don't know why you're deleting arguments from your calls. You're passing too few arguments (only 8). Why are you doing that?
|
because I think rvx rvy is useless , I removed them from _traceStep()'s definition |
If it is true that they are useless, then those arguments would need to be removed from the function signature too.
Why are they useless though?
|
_traceStep is called like this: Impact/lib/impact/collision-map.js Lines 40 to 44 in 7768fd2
This is passing the velocity for one step ( Simple example: you hit the ground at an angle. The resolved y position will be the impact position, the x position however will incorporate the x velocity, essentially sliding you over the ground. Here the real x velocity is needed, not the x velocity for just one step of collision detection. |
@phoboslab thanks . ![]() should we use the red point ? |
Uh oh!
There was an error while loading. Please reload this page.
Discuss about
rvx, rvy
incollection-map.js
there is a function with arguments named
rvx, rvy
, What do they mean? what's the full name ?Impact/lib/impact/collision-map.js
Line 63 in 7768fd2
the
_traceStep()
be called with vx & vyImpact/lib/impact/collision-map.js
Line 44 in 7768fd2
Why do you pass
vx , vy
? in my opinion , at line 44 , It should passsx ,sy
the function
_traceStep
has argumentsrvx, rvy
, and pass them into_checkTileDef()
Impact/lib/impact/collision-map.js
Line 95 in 7768fd2
Impact/lib/impact/collision-map.js
Line 104 in 7768fd2
Impact/lib/impact/collision-map.js
Line 142 in 7768fd2
Impact/lib/impact/collision-map.js
Line 150 in 7768fd2
Why do you pass
rvx , rvy
? in my opinion , at line 44 , It should passvx ,vy
.I post a PR , Just for comparing the differences in the code
https://github.com/phoboslab/Impact/pull/100/files
If change the code to my version, will there be any problems?
The text was updated successfully, but these errors were encountered: