B4X FEED [XUI2D] To Collide or Not To Collide

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: [XUI2D] To Collide or Not To Collide است. این موضوع تا کنون 63 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع [XUI2D] To Collide or Not To Collide
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
63
پسندها
0
آخرین ارسال توسط PracticalSoft
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
Jun 6, 2020
11,593
4,507
برای دیدن تصاویر باید ثبت نام کنید



The purpose of this example is to demonstrate the usage of mask bits and category bits properties.

Collision rules:

- Collisions happen between dynamic bodies and other bodies (including other dynamic bodies).
- The collisions actually happen between two fixtures of two bodies. Bodies can have multiple fixtures with different properties.
- If a fixture is set to be a sensor (is sensor property) then the collision will be detected but there will not be a physical collision.

Now for mask bits and category bits. The formal rule sounds a bit complicated so we will start with an example.
The default mask bits is 65535 (0xFFFF).
0xFFFF in base 2 is 1111 1111 1111 1111.
Category bits should be a power of 2. This means that it is a number with a single high (1) bit. The default value is 1.

If the same bit is high in both the mask bits and the category bits then we have a collision.

In our...



 

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.
عقب
بالا