0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

robloxでassistant その154

Posted at

概要

robloxでassistantやってみた。
練習問題、やってみた。

練習問題

PhysicsServiceを使え。

サンプルコード


local ball = Instance.new("Part", workspace)
ball.CFrame = CFrame.new(0, 10, -3)
local door = Instance.new("Part", workspace)
door.CFrame = CFrame.new(0, 10, 0)

local PhysicsService = game:GetService("PhysicsService")
local collisionGroupBall = "CollisionGroupBall"
local collisionGroupDoor = "CollisionGroupDoor"
PhysicsService:RegisterCollisionGroup(collisionGroupBall)
PhysicsService:RegisterCollisionGroup(collisionGroupDoor)
ball.CollisionGroup = collisionGroupBall
door.CollisionGroup = collisionGroupDoor
PhysicsService:CollisionGroupSetCollidable(collisionGroupBall, collisionGroupDoor, false)
print(PhysicsService:CollisionGroupsAreCollidable(collisionGroupBall, collisionGroupDoor)) 

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?