CMSC 425 Lecture Notes - Lecture 1: Collider
Problem 1.
(a) Colliders come in two different types, colliders and triggers. Think of colliders as solid physical
objects that should not overlap, whereas a trigger is an invisible barrier that sends a signal
when crossed. An example is like with the rolling ball or a character it should not pass through
a wall therefore it should be a collider. When a Character passes enters a room, there could
be trigger event that occurs when the character enters a room.
(b)
• P[0] = 1*a + 0*b + 0*c
• P[1] = ¾*a + 1/8*b + 1/8*c
• P[2] = ½*a + ¼*b + ¼*c
• P[3] = ¼*a + 3/8*b + 3/8*c
• P[4] = 0*a + ½*b + ½*c
(c) transform . Rotate (new Vector3 (0 , 45 , 0)*4)
Problem 2.
(a) U = q – p , V = c – p
(b) Lets say temp vector Y = t – p, Vector Y = ((V*U)/(U*U))*U, Therefore, t = Y + p, t =
((V*U)/(U*U))*U + p
(c) Using the equation in b to get t all you have to do is subtract it by the vector between the point t
ad t’
(d) P(t) = p(1-t) + qt, 0<= t <=1, there for we need the dist(P(t),p) <= r+s
(e) code
Problem 3.
(a) TBD
(b) TBD
Problem 4.
(a) We start with a square, and with each iteration we replace each line segment of length x by a
chain of 4 subsegments each of length (2)^1/2/4x.
Ln(4)/ln(2^(1/2)/4) = ln(4)/ ½*ln(2) - ln(4)
(b)
(i) Let d = ad δ = 9◦ . Let us assue that e start i the loer-left corner of the square
((x, y) = , ad the headig is to the east α = .
(ii) • F: Moe forard a step of legth d i the urret diretio, that is, hage the
state fro , , α to the e state +d os α, +d si α, α, ad dra a lie fro the
current position to the new position.
• +: Irease the tur agle δ, that is, hage the state fro , , α to , , α+δ.
• −: Derease the tur agle δ, that is, hage the state fro , , α to , , α−δ.
• *: “ae as −, but change the state from , , α−δ) to , , α−δ/2).
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
Problem 1. (a) colliders come in two different types, colliders and triggers. Think of colliders as solid physical objects that should not overlap, whereas a trigger is an invisible barrier that sends a signal when crossed. An example is like with the rolling ball or a character it should not pass through a wall therefore it should be a collider. Rotate (new vector3 (0 , 45 , 0)*4) Problem 4. (a) we start with a square, and with each iteration we replace each line segment of length x by a chain of 4 subsegments each of length (2)^1/2/4x. Ln(4)/ln(2^(1/2)/4) = ln(4)/ *ln(2) - ln(4) (b) (i) (ii) Let d = (cid:1005) a(cid:374)d = 9(cid:1004) . = f + f + f + f p = {f * f + ff f +} (iii) (iv) 0 0 1 (b) t[ cd] * t[bc] * t[ab] = t[ad]